//1.图片 2.音频 3.视频 4.文档 5.压缩文件 6.其他
export function showTypeFilter(type) {
  switch (type) {
    case 'png':
    case 'jpg':
    case 'jpeg':
    case 'gif':
    case 'bmp':
    case 'svg':
      return 1
    case 'mp3':
      return 2
    case 'avi':
    case 'mp4':
      return 3
    case 'txt':
    case 'doc':
    case 'docx':
    case 'xls':
    case 'xlsx':
    case 'pdf':
    case 'ppt':
      return 4
    case 'rar':
    case 'zip':
      return 5
    default:
      return 6
  }
}
//缩略图
export function thumbnailFilter(str, url, miniUrl) {
  str = str.toLowerCase()
  switch (str) {
    case 'png':
    case 'jpg':
    case 'jpeg':
    case 'gif':
    case 'bmp':
    case 'svg':
      return miniUrl || url || require('@/assets/file/imgs.png')
    case 'mp3':
      return require('@/assets/file/music.png')
    case 'avi':
    case 'mp4':
      return require('@/assets/file/video.png')
    case 'txt':
      return require('@/assets/file/txt.png')
    case 'doc':
    case 'docx':
      return require('@/assets/file/doc.png')
    case 'xls':
    case 'xlsx':
      return require('@/assets/file/excl.png')
    case 'pdf':
      return require('@/assets/file/pdf.png')
    case 'ppt':
      return require('@/assets/file/ppt.png')
    case 'rar':
    case 'zip':
      return require('@/assets/file/zip.png')
    case 'js':
    case 'html':
    case 'java':
    case 'css':
      return require('@/assets/file/code.png')
    default:
      return require('@/assets/file/cloud.png')
  }
}
